//
//  MainWindowRootManager.h
//  MXApp
//
//  Created by CC on 2019/6/1.
//  Copyright © 2019 Shanghai YingXiang Network Technology Co., Ltd. All rights reserved.
//

#import "LcSingleton.h"
#import "LcFoundation.h"
#import "UITabBarController+Lc.h"
#import "MainViewController.h"

typedef BOOL(^IsControllerNeedRemoveHandler)(UIViewController* viewController);

@class MainViewController, Player;

@interface MainWindowRootManager : LcSingleton <UITabBarControllerDelegate>

@property (nonatomic, strong) UIWindow* mainWindow;
@property (nonatomic, weak) MainViewController* mainController;
@property (nonatomic, assign) MainTabIndex selectedIndex;

- (void)startAppMainWindow;
- (void)doLogoutAction;
- (UIViewController*)generateMainViewController;

- (void)selectedIndex:(MainTabIndex)tabIndex;
- (void)switchToTabIndex:(MainTabIndex)tabIndex;
- (void)switchToTabIndex:(MainTabIndex)tabIndex pushViewController:(UIViewController*)toViewController;
- (void)switchToTabIndex:(MainTabIndex)tabIndex pushViewController:(UIViewController*)toViewController animated:(BOOL)animated;
- (void)switchToTabIndex:(MainTabIndex)tabIndex pushViewControllers:(NSArray*)viewControllers animated:(BOOL)animated;
- (void)removeViewControllers:(IsControllerNeedRemoveHandler)handler;
- (void)currentTabPushViewController:(UIViewController*)toViewController;

@end

